https://glot.io/snippets/ghj70dtn8f/raw/main.lua